package com.bilibili.demo;

public class GoldCard extends Card{
    public GoldCard() {}
    public GoldCard(String carID,String name,String phone,double money){
        super(carID,name,phone,money);
    }
    @Override
    public void huaqian(double money) {
        System.out.println("你当前消费："+money);
        System.out.println("优惠后的价格："+money * 0.8);
        setMoney(getMoney()-money*0.8);
        if(money*0.8>=200){
            print();
        }
        else{
            System.out.println("感谢你的消费，满200送洗车票哦");
        }
    }
    public void print(){
        System.out.println("满200了，打印洗车票");
    }
}
